/**
 * 
 */
package ar.com.greensoft.neo.model;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * 
 * @author Jorge E. Villaverde
 * @since 06/02/2012
 * @version 1.0.0
 */
@Entity
@Table(name="paciente")
@NamedQueries({
	@NamedQuery(name=Paciente.FIND_ALL_QUERY_NAME, query="SELECT c FROM Paciente c"),
	@NamedQuery(name=Paciente.FIND_BY_CUIP_QUERY_NAME, query="SELECT c FROM Paciente c WHERE c.cuip = :cuip"),
	@NamedQuery(name=Paciente.COUNT_QUERY_NAME,    query="SELECT COUNT(c) FROM Paciente c")
})
public class Paciente extends PersonaFisica {

	public static final String FIND_ALL_QUERY_NAME = "Paciente.findAll";
	public static final String FIND_BY_CUIP_QUERY_NAME = "Paciente.findByCuip";
	public static final String COUNT_QUERY_NAME = "Paciente.count";
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@ManyToOne
	@NotNull
	private PersonaFisica madre;

	@ManyToOne
	private PersonaFisica padre;

	public PersonaFisica getMadre() {
		return madre;
	}

	public void setMadre(PersonaFisica madre) {
		this.madre = madre;
	}

	public PersonaFisica getPadre() {
		return padre;
	}

	public void setPadre(PersonaFisica padre) {
		this.padre = padre;
	}
}
